package file;

import java.io.File;
import java.io.IOException;

import static java.nio.file.Files.delete;

public class Test {
    public static void main(String[] args) throws IOException {
        delete();
    }

    private static void create() throws IOException {
        for (int i = 1; i < 10; i++) {
            String fileName = "test" + i + ".txt";
            File file = new File(fileName);
            ;
            file.createNewFile();
        }
    }

    public static void delete() {
        for (int i = 1; i < 10; i++) {
            String fileName = "test" + i + ".txt";
            File file = new File(fileName);
            file.delete();
        }
    }

}

